//
//  EHPopverAnimator.h
//  SYBaseProject
//
//  Created by SY on 2025/6/19.
//  Copyright © 2025 YYB. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN

// 常量定义
extern const CGFloat kDefaultAnimationDuration;
typedef void(^EHPopoverAnimatorCompletion)(BOOL presented);

@interface EHPopoverAnimator : NSObject <UIViewControllerTransitioningDelegate,
                                        UIViewControllerAnimatedTransitioning>

@property (nonatomic, assign) BOOL isPresented;
@property (nonatomic, assign) BOOL isTransform3D;
@property (nonatomic, assign) CGRect presentedFrame;
@property (nonatomic, copy) EHPopoverAnimatorCompletion completion;

+ (instancetype)animatorWithCompletion:(EHPopoverAnimatorCompletion)completion;
- (void)presentFromViewController:(UIViewController *)fromViewController
               toViewController:(UIViewController *)toViewController
                 isTransform3D:(BOOL)isTransform3D;

@end


/** 使用方法
 let vc = PGGLaserSuctionAndCustomModeViewController.init(device: device)
 vc.laserRobotDetail = self
 EHPopverAnimator.presen(fromViewController: self, toViewController: CyNavigationController.init(rootViewController: vc))
 */
NS_ASSUME_NONNULL_END
